/**
 * 
 */
package com.google.code.rookery.converter;

import com.google.code.rookery.Doo;
import com.google.code.rookery.Dooby;

/**
 * Converts a Doo into a Dooby
 * @author Xerox
 */
public class DooConverter extends InstanceConverter {

  /* (non-Javadoc)
   * @see com.google.code.rookery.converter.InstanceConverter#convert(java.lang.Object)
   */
  @Override
  public Object convert(Object obj) {
    Dooby result = new Dooby();
    Doo doo = (Doo) obj;
    StringBuilder sb = new StringBuilder();
    sb.append(doo.getFirstName());
    sb.append(' ');
    sb.append(doo.getLastName());
    result.setName(sb.toString());
    return result;
  }
}
